import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lily
 * Date: 2024-10-16
 * Time: 19:09
 */
public class test_1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int num = in.nextInt();
            int falg = 0;
            StringBuffer str = new StringBuffer();
            while (num != 0) {
                if (falg == 3) {
                    str.insert(0,',');
                    falg=0;
                }
                int n = num % 10;
                str.insert(0,n);
                num/=10;
                falg++;
            }
            System.out.println(str.toString());
        }
    }
}
